package com.itheima.IO;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class Demo2 {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("day12_file&IOstream\\stu.txt");
        byte[] b = {19,82,83,86,85};
        //多次存储
        fos.write(b, 1, 3);
        //或者使用getbyte方法
         fos.write("zhangsan,23".getBytes());

    }
}
